// void, Obj me, Item item, Obj h

Hero this;
ItemHolder holder;
point pt;

Sleep(10);
this = me.AsHero();
if(!.IsValid) return;

if(.HasItem("irage_battle")) return;
if(.HasItem("irage_battle_stand")) return;
if(.HasItem("igreat_charge")) return;
if(.HasItem("iretreat_notai")) return;

holder = h.AsItemHolder();
  
if (.PathTo (holder, .FormRadius(), 0) > .FormRadius ())
{
	.FormSetupAndMoveTo (holder, GetConst("GiveDistance"), 0, true);
	while (.HasPath())
	{
		.FormKeepMoving(1500);
	}
	pt = .pos;
}
else
	pt.Set (-1, -1);
	
.army.SetCommand("stand_position");

while(!.Goto (holder, GetConst("GiveDistance"), 1500, false, 5000));

.PutItem (item, holder);

if (pt.x != -1)
	while (!.Goto (pt, 0, 1500, false, 5000));
	